//传入stage会按顺序排序
let {SyncHook} = require('tapable');
let hook = new SyncHook(['name'])
hook.tap(({name:'tap1',stage:1}),(name)=>{
    console.log(1,name);
})
hook.tap(({name:'tap3',stage:3}),(name)=>{
    console.log(3,name);
})
hook.tap(({name:'tap5',stage:5}),(name)=>{
    console.log(5,name);
})
hook.tap(({name:'tap2',stage:2}),(name)=>{
    console.log(2,name);
})
//按照以前写法，是按注册的顺序执行
hook.call('zhufeng')